import request from '@/utils/request'

export function fetchList(params) {
  return request({
    url: '/label',
    method: 'get',
    params
  })
}

export function fetchDetail(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}

export function create(data) {
  return request({
    url: '/label',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/label',
    method: 'patch',
    data
  })
}

export function remove(id) {
  return request({
    url: `/label/${id}`,
    method: 'delete'
  })
}
